import server from "./server";

export const query = {
  size: 10,
  page: 1,
};

export function getLoser() {
  return server({
    url: "/loser/findAll",
    params: {
      pageSize: query.size,
      pageNum: query.page,
    },
  });
}

export function getDetail(id: number) {
  return server({
    url: "/loser/detail?id=" + id,
  });
}

export function getSearchLoser(name: string) {
  return server({
    url: "/loser/findAll?l_name=" + name,
  });
}

export function getAllLosers() {
  return server({
    url: "/loser/getAll",
  });
}
